<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>通讯协议操作手册V1</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CFC9',
                        neutral: '#6B7280',
                        dark: '#1F2937',
                        light: '#F9FAFB'
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .card-hover {
                @apply transition-all duration-300 hover:shadow-lg hover:-translate-y-1;
            }
            .section-transition {
                @apply transition-all duration-500 ease-in-out;
            }
        }
    </style>
</head>
<body class="font-inter bg-gray-50 text-dark">
    <!-- 导航栏 -->
    <header id="navbar" class="fixed w-full bg-white/90 backdrop-blur-sm shadow-sm z-50 transition-all duration-300">
        <div class="container mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between items-center h-16">
                <div class="flex items-center">
                    <i class="fa fa-exchange text-primary text-2xl mr-2"></i>
                    <span class="text-xl font-bold text-primary">通讯协议操作手册V1</span>
                </div>
                <nav class="hidden md:flex space-x-8">
                    <a href="#overview" class="text-gray-700 hover:text-primary transition-colors">概述</a>
                    <a href="#network" class="text-gray-700 hover:text-primary transition-colors">网络通信</a>
                    <a href="#iot" class="text-gray-700 hover:text-primary transition-colors">设备互联</a>
                    <a href="#industrial" class="text-gray-700 hover:text-primary transition-colors">工业控制</a>
                    <a href="#examples" class="text-gray-700 hover:text-primary transition-colors">操作示例</a>
                    <a href="#faq" class="text-gray-700 hover:text-primary transition-colors">常见问题</a>
                </nav>
                <button id="mobile-menu-button" class="md:hidden text-gray-700 hover:text-primary">
                    <i class="fa fa-bars text-xl"></i>
                </button>
            </div>
        </div>
        <!-- 移动端菜单 -->
        <div id="mobile-menu" class="hidden md:hidden bg-white border-t">
            <div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
                <a href="#overview" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 hover:text-primary">概述</a>
                <a href="#network" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 hover:text-primary">网络通信</a>
                <a href="#iot" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 hover:text-primary">设备互联</a>
                <a href="#industrial" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 hover:text-primary">工业控制</a>
                <a href="#examples" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 hover:text-primary">操作示例</a>
                <a href="#faq" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 hover:text-primary">常见问题</a>
            </div>
        </div>
    </header>

    <!-- 英雄区域 -->
    <section class="pt-24 pb-16 md:pt-32 md:pb-24 bg-gradient-to-br from-primary/10 to-secondary/10">
        <div class="container mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex flex-col md:flex-row items-center">
                <div class="w-full md:w-1/2 mb-10 md:mb-0">
                    <h1 class="text-[clamp(2rem,5vw,3.5rem)] font-bold leading-tight text-dark mb-4">
                        通讯协议<br>
                        <span class="text-primary">操作指南 V1</span>
                    </h1>
                    <p class="text-lg text-gray-600 mb-8 max-w-xl">
                        全面掌握不同行业场景下的通讯协议，从基础概念到实际应用，帮助你快速上手并解决实际问题。
                    </p>
                    <div class="flex flex-wrap gap-4">
                        <a href="#overview" class="px-6 py-3 bg-primary text-white rounded-lg shadow-lg hover:bg-primary/90 transition-all duration-300 transform hover:-translate-y-1 flex items-center">
                            <i class="fa fa-book mr-2"></i> 开始阅读
                        </a>
                        <a href="#download" class="px-6 py-3 bg-white text-primary border border-primary rounded-lg shadow-md hover:bg-gray-50 transition-all duration-300 flex items-center">
                            <i class="fa fa-download mr-2"></i> 下载手册
                        </a>
                    </div>
                </div>
                <div class="w-full md:w-1/2 flex justify-center">
                    <div class="relative w-full max-w-md">
                        <div class="absolute -top-4 -left-4 w-16 h-16 bg-primary/20 rounded-lg"></div>
                        <div class="absolute -bottom-4 -right-4 w-16 h-16 bg-secondary/20 rounded-lg"></div>
                        <img src="https://picsum.photos/seed/protocol/600/400" alt="通讯协议示意图" class="relative z-10 rounded-lg shadow-xl w-full">
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 概述部分 -->
    <section id="overview" class="py-16 bg-white">
        <div class="container mx-auto px-4 sm:px-6 lg:px-8">
            <div class="text-center mb-16">
                <h2 class="text-3xl md:text-4xl font-bold mb-4">通讯协议概述</h2>
                <p class="text-gray-600 max-w-3xl mx-auto">通讯协议是通信双方为了实现通信而设计的一种约定，它规定了数据传输的格式、时序、错误处理等方面的规则。</p>
            </div>

            <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
                <div class="bg-gray-50 rounded-xl p-6 shadow-sm card-hover">
                    <div class="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
                        <i class="fa fa-server text-primary text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">什么是通讯协议？</h3>
                    <p class="text-gray-600">通讯协议是指双方实体完成通信或服务所必须遵循的规则和约定，它定义了数据如何打包、传输、接收和解析。</p>
                </div>

                <div class="bg-gray-50 rounded-xl p-6 shadow-sm card-hover">
                    <div class="w-12 h-12 bg-secondary/10 rounded-lg flex items-center justify-center mb-4">
                        <i class="fa fa-sitemap text-secondary text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">为什么需要协议？</h3>
                    <p class="text-gray-600">协议确保了不同设备和系统之间能够准确、可靠地进行通信，是实现互联互通的基础。</p>
                </div>

                <div class="bg-gray-50 rounded-xl p-6 shadow-sm card-hover">
                    <div class="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
                        <i class="fa fa-code-fork text-primary text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">常见协议分类</h3>
                    <p class="text-gray-600">通讯协议可分为网络层协议、传输层协议、应用层协议等，不同类型的协议在不同的场景中发挥作用。</p>
                </div>
            </div>

            <div class="mt-16 bg-gray-50 rounded-xl p-8">
                <h3 class="text-2xl font-bold mb-6">协议基本要素</h3>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                    <div>
                        <h4 class="text-lg font-semibold mb-3 flex items-center">
                            <i class="fa fa-file-text-o text-primary mr-2"></i> 语法
                        </h4>
                        <p class="text-gray-600 mb-4">数据格式、编码方式和信号电平等，例如TCP/IP协议中的数据包格式。</p>
                        
                        <h4 class="text-lg font-semibold mb-3 flex items-center">
                            <i class="fa fa-clock-o text-primary mr-2"></i> 时序
                        </h4>
                        <p class="text-gray-600 mb-4">事件执行的顺序，例如是请求/响应模式还是广播模式。</p>
                    </div>
                    <div>
                        <h4 class="text-lg font-semibold mb-3 flex items-center">
                            <i class="fa fa-language text-primary mr-2"></i> 语义
                        </h4>
                        <p class="text-gray-600 mb-4">每个符号和消息的含义，例如错误指示、控制信息等。</p>
                        
                        <h4 class="text-lg font-semibold mb-3 flex items-center">
                            <i class="fa fa-cogs text-primary mr-2"></i> 同步
                        </h4>
                        <p class="text-gray-600">发送方和接收方之间的时序协调机制，确保数据的正确传输和接收。</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 网络通信协议 -->
    <section id="network" class="py-16 bg-gray-50">
        <div class="container mx-auto px-4 sm:px-6 lg:px-8">
            <div class="text-center mb-16">
                <h2 class="text-3xl md:text-4xl font-bold mb-4">网络通信协议</h2>
                <p class="text-gray-600 max-w-3xl mx-auto">网络通信协议是计算机网络中实现数据交换的规则，它是互联网的基础。</p>
            </div>

            <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mb-12">
                <div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
                    <div class="h-48 bg-primary/10 flex items-center justify-center">
                        <img src="https://picsum.photos/seed/tcpip/600/300" alt="TCP/IP协议栈示意图" class="w-full h-full object-cover">
                    </div>
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-2">TCP/IP协议</h3>
                        <p class="text-gray-600 mb-4">TCP/IP是互联网的基础协议，它定义了电子设备如何连入互联网以及数据如何在它们之间传输的标准。</p>
                        <div class="space-y-3">
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>面向连接的可靠传输</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>使用三次握手建立连接</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>提供流量控制和拥塞控制</span>
                            </div>
                        </div>
                        <button class="mt-6 px-4 py-2 bg-primary/10 text-primary rounded-lg hover:bg-primary/20 transition-colors">
                            查看详细
                        </button>
                    </div>
                </div>

                <div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
                    <div class="h-48 bg-secondary/10 flex items-center justify-center">
                        <img src="https://picsum.photos/seed/http/600/300" alt="HTTP协议通信过程示意图" class="w-full h-full object-cover">
                    </div>
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-2">HTTP/HTTPS协议</h3>
                        <p class="text-gray-600 mb-4">HTTP是用于传输超文本的协议，是万维网的数据通信的基础，HTTPS是HTTP的安全版本。</p>
                        <div class="space-y-3">
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>无状态的请求-响应协议</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>支持多种请求方法(GET, POST等)</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>HTTPS通过TLS提供加密和身份验证</span>
                            </div>
                        </div>
                        <button class="mt-6 px-4 py-2 bg-primary/10 text-primary rounded-lg hover:bg-primary/20 transition-colors">
                            查看详细
                        </button>
                    </div>
                </div>
            </div>

            <div class="bg-white rounded-xl p-8 shadow-sm">
                <h3 class="text-2xl font-bold mb-6">网络协议对比</h3>
                <div class="overflow-x-auto">
                    <table class="min-w-full divide-y divide-gray-200">
                        <thead class="bg-gray-50">
                            <tr>
                                <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">协议</th>
                                <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">应用场景</th>
                                <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">传输特性</th>
                                <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">安全性</th>
                                <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">典型应用</th>
                            </tr>
                        </thead>
                        <tbody class="bg-white divide-y divide-gray-200">
                            <tr>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="flex items-center">
                                        <div class="h-8 w-8 bg-blue-100 rounded-full flex items-center justify-center">
                                            <i class="fa fa-exchange text-blue-500"></i>
                                        </div>
                                        <div class="ml-4">
                                            <div class="text-sm font-medium text-gray-900">TCP</div>
                                        </div>
                                    </div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">需要可靠传输的场景</div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">面向连接，可靠</div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">需要上层协议提供安全</div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">文件传输、邮件、网页</div>
                                </td>
                            </tr>
                            <tr>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="flex items-center">
                                        <div class="h-8 w-8 bg-green-100 rounded-full flex items-center justify-center">
                                            <i class="fa fa-bolt text-green-500"></i>
                                        </div>
                                        <div class="ml-4">
                                            <div class="text-sm font-medium text-gray-900">UDP</div>
                                        </div>
                                    </div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">实时性要求高的场景</div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">无连接，不可靠</div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">需要上层协议提供安全</div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">视频流、音频流、游戏</div>
                                </td>
                            </tr>
                            <tr>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="flex items-center">
                                        <div class="h-8 w-8 bg-purple-100 rounded-full flex items-center justify-center">
                                            <i class="fa fa-globe text-purple-500"></i>
                                        </div>
                                        <div class="ml-4">
                                            <div class="text-sm font-medium text-gray-900">HTTP</div>
                                        </div>
                                    </div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">Web应用</div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">无状态，请求-响应</div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">HTTP不安全，HTTPS安全</div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="text-sm text-gray-900">网站、API</div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </section>

    <!-- 设备互联协议 -->
    <section id="iot" class="py-16 bg-white">
        <div class="container mx-auto px-4 sm:px-6 lg:px-8">
            <div class="text-center mb-16">
                <h2 class="text-3xl md:text-4xl font-bold mb-4">设备互联协议</h2>
                <p class="text-gray-600 max-w-3xl mx-auto">设备互联协议是物联网设备之间进行通信的规则，它使各种智能设备能够互相交流和协作。</p>
            </div>

            <div class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-12">
                <div class="bg-gray-50 rounded-xl p-6 shadow-sm card-hover">
                    <div class="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
                        <i class="fa fa-wifi text-primary text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">MQTT协议</h3>
                    <p class="text-gray-600 mb-4">MQTT是一种轻量级的消息传输协议，特别适合低带宽、不稳定网络环境下的物联网设备通信。</p>
                    <ul class="space-y-2 text-gray-600">
                        <li class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>基于发布/订阅模式</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>支持三种QoS级别</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>占用资源少，易于实现</span>
                        </li>
                    </ul>
                </div>

                <div class="bg-gray-50 rounded-xl p-6 shadow-sm card-hover">
                    <div class="w-12 h-12 bg-secondary/10 rounded-lg flex items-center justify-center mb-4">
                        <i class="fa fa-rss text-secondary text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">CoAP协议</h3>
                    <p class="text-gray-600 mb-4">CoAP是一种专门为受限设备和低功耗网络设计的应用层协议，是HTTP协议的轻量级替代。</p>
                    <ul class="space-y-2 text-gray-600">
                        <li class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>基于REST架构</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>使用UDP作为传输层</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>支持资源发现和观察模式</span>
                        </li>
                    </ul>
                </div>

                <div class="bg-gray-50 rounded-xl p-6 shadow-sm card-hover">
                    <div class="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
                        <i class="fa fa-plug text-primary text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">ZigBee协议</h3>
                    <p class="text-gray-600 mb-4">ZigBee是一种低功耗、低数据速率的无线通信协议，适合家庭自动化和工业监控等场景。</p>
                    <ul class="space-y-2 text-gray-600">
                        <li class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>自组织网络拓扑</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>低功耗，电池可运行数年</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>支持多达65,000个节点</span>
                        </li>
                    </ul>
                </div>
            </div>

            <div class="bg-gray-50 rounded-xl p-8">
                <h3 class="text-2xl font-bold mb-6">设备互联协议选型指南</h3>
                <div class="space-y-6">
                    <div class="p-4 bg-white rounded-lg shadow-sm">
                        <h4 class="text-lg font-semibold mb-2 flex items-center">
                            <i class="fa fa-lightbulb-o text-primary mr-2"></i> 选择MQTT的场景
                        </h4>
                        <ul class="space-y-2 text-gray-600">
                            <li class="flex items-start">
                                <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                <span>需要支持大量设备连接的场景</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                <span>网络带宽有限或不稳定的环境</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                <span>需要实时数据传输和处理的应用</span>
                            </li>
                        </ul>
                    </div>

                    <div class="p-4 bg-white rounded-lg shadow-sm">
                        <h4 class="text-lg font-semibold mb-2 flex items-center">
                            <i class="fa fa-lightbulb-o text-secondary mr-2"></i> 选择CoAP的场景
                        </h4>
                        <ul class="space-y-2 text-gray-600">
                            <li class="flex items-start">
                                <i class="fa fa-circle text-xs text-secondary mt-1.5 mr-2"></i>
                                <span>资源受限的设备(如传感器)</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fa fa-circle text-xs text-secondary mt-1.5 mr-2"></i>
                                <span>需要与HTTP服务集成的物联网应用</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fa fa-circle text-xs text-secondary mt-1.5 mr-2"></i>
                                <span>低功耗、低带宽的网络环境</span>
                            </li>
                        </ul>
                    </div>

                    <div class="p-4 bg-white rounded-lg shadow-sm">
                        <h4 class="text-lg font-semibold mb-2 flex items-center">
                            <i class="fa fa-lightbulb-o text-primary mr-2"></i> 选择ZigBee的场景
                        </h4>
                        <ul class="space-y-2 text-gray-600">
                            <li class="flex items-start">
                                <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                <span>需要构建大规模设备网络的场景</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                <span>低功耗、低成本的设备连接</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                <span>近距离、低速率的数据传输</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 工业控制协议 -->
    <section id="industrial" class="py-16 bg-gray-50">
        <div class="container mx-auto px-4 sm:px-6 lg:px-8">
            <div class="text-center mb-16">
                <h2 class="text-3xl md:text-4xl font-bold mb-4">工业控制协议</h2>
                <p class="text-gray-600 max-w-3xl mx-auto">工业控制协议是工业自动化系统中实现设备间通信和控制的规则，是工业4.0的重要基础。</p>
            </div>

            <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mb-12">
                <div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
                    <div class="h-48 bg-primary/10 flex items-center justify-center">
                        <img src="https://picsum.photos/seed/modbus/600/300" alt="Modbus协议通信示意图" class="w-full h-full object-cover">
                    </div>
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-2">Modbus协议</h3>
                        <p class="text-gray-600 mb-4">Modbus是一种串行通信协议，是工业领域最常用的通信协议之一，用于连接电子设备。</p>
                        <div class="space-y-3">
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>简单、可靠、易于实现</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>支持多种传输介质(RS-232, RS-485, TCP/IP)</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>广泛应用于工业自动化领域</span>
                            </div>
                        </div>
                        <button class="mt-6 px-4 py-2 bg-primary/10 text-primary rounded-lg hover:bg-primary/20 transition-colors">
                            查看详细
                        </button>
                    </div>
                </div>

                <div class="bg-white rounded-xl overflow-hidden shadow-sm card-hover">
                    <div class="h-48 bg-secondary/10 flex items-center justify-center">
                        <img src="https://picsum.photos/seed/opcua/600/300" alt="OPC UA协议架构图" class="w-full h-full object-cover">
                    </div>
                    <div class="p-6">
                        <h3 class="text-xl font-semibold mb-2">OPC UA协议</h3>
                        <p class="text-gray-600 mb-4">OPC UA是一种工业通信协议，为自动化行业提供了统一的数据访问标准，支持跨平台通信。</p>
                        <div class="space-y-3">
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>面向服务的架构</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>内置安全机制和数据建模</span>
                            </div>
                            <div class="flex items-center">
                                <i class="fa fa-check text-green-500 mr-2"></i>
                                <span>支持实时数据、报警和历史数据</span>
                            </div>
                        </div>
                        <button class="mt-6 px-4 py-2 bg-primary/10 text-primary rounded-lg hover:bg-primary/20 transition-colors">
                            查看详细
                        </button>
                    </div>
                </div>
            </div>

            <div class="bg-white rounded-xl p-8 shadow-sm">
                <h3 class="text-2xl font-bold mb-6">工业协议应用案例</h3>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                    <div class="bg-gray-50 rounded-lg p-6">
                        <h4 class="text-lg font-semibold mb-4 flex items-center">
                            <i class="fa fa-industry text-primary mr-2"></i> 智能制造生产线监控
                        </h4>
                        <p class="text-gray-600 mb-4">某汽车制造企业通过OPC UA协议实现了对生产线设备的实时监控和数据采集。</p>
                        <div class="space-y-3">
                            <div class="flex items-start">
                                <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                <span>通过OPC UA服务器连接PLC、机器人等设备</span>
                            </div>
                            <div class="flex items-start">
                                <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                <span>实现生产数据的实时采集和分析</span>
                            </div>
                            <div class="flex items-start">
                                <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                <span>提高了生产效率和质量控制能力</span>
                            </div>
                        </div>
                    </div>

                    <div class="bg-gray-50 rounded-lg p-6">
                        <h4 class="text-lg font-semibold mb-4 flex items-center">
                            <i class="fa fa-cogs text-secondary mr-2"></i> 分布式能源管理系统
                        </h4>
                        <p class="text-gray-600 mb-4">某智能电网项目采用Modbus TCP协议实现了对分布式能源设备的远程监控和控制。</p>
                        <div class="space-y-3">
                            <div class="flex items-start">
                                <i class="fa fa-circle text-xs text-secondary mt-1.5 mr-2"></i>
                                <span>通过Modbus TCP协议连接太阳能板、风力发电机等设备</span>
                            </div>
                            <div class="flex items-start">
                                <i class="fa fa-circle text-xs text-secondary mt-1.5 mr-2"></i>
                                <span>实现能源数据的实时采集和分析</span>
                            </div>
                            <div class="flex items-start">
                                <i class="fa fa-circle text-xs text-secondary mt-1.5 mr-2"></i>
                                <span>优化了能源分配和使用效率</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 操作示例部分 -->
    <section id="examples" class="py-16 bg-white">
        <div class="container mx-auto px-4 sm:px-6 lg:px-8">
            <div class="text-center mb-16">
                <h2 class="text-3xl md:text-4xl font-bold mb-4">通讯协议操作示例</h2>
                <p class="text-gray-600 max-w-3xl mx-auto">这里提供了各类通讯协议的具体操作示例，帮助你更好地理解和应用这些协议。</p>
            </div>

            <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mb-12">
                <div class="bg-gray-50 rounded-xl p-6 shadow-sm card-hover">
                    <div class="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
                        <i class="fa fa-file-text-o text-primary text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">NA200 MODBUS通信与PID控制示例教程</h3>
                    <p class="text-gray-600 mb-4">以南大傲拓的嵌入式控制器NA200为例，介绍MODBUS配置、功能码应用、PID参数调整等内容。</p>
                    <div class="space-y-3">
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>详细介绍MODBUS网络设置，包括硬件连接和软件配置</span>
                        </div>
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>讲解不同控制器下的配置实例和故障排查方法</span>
                        </div>
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>提供PID控制参数调整的实践指南</span>
                        </div>
                    </div>
                    <a href="#" class="mt-6 inline-block px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">
                        查看完整示例
                    </a>
                </div>

                <div class="bg-gray-50 rounded-xl p-6 shadow-sm card-hover">
                    <div class="w-12 h-12 bg-secondary/10 rounded-lg flex items-center justify-center mb-4">
                        <i class="fa fa-file-text-o text-secondary text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">晨控CK-FR12与欧姆龙NX系列PLC配置EtherNet/IP通讯连接操作手册</h3>
                    <p class="text-gray-600 mb-4">围绕晨控CK-FR12系列工业级别RFID读写器与欧姆龙NX系列PLC的通讯配置展开。</p>
                    <div class="space-y-3">
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>介绍通过以太网连接时的配置设置和通讯设置步骤</span>
                        </div>
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>说明功能块的使用方法，如写操作和读操作的具体步骤</span>
                        </div>
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>提供实际应用中的调试和优化建议</span>
                        </div>
                    </div>
                    <a href="#" class="mt-6 inline-block px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">
                        查看完整示例
                    </a>
                </div>
            </div>

            <div class="grid grid-cols-1 md:grid-cols-2 gap-8 mb-12">
                <div class="bg-gray-50 rounded-xl p-6 shadow-sm card-hover">
                    <div class="w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center mb-4">
                        <i class="fa fa-file-text-o text-primary text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">施耐德ATV12变频器Modbus通信实战指南</h3>
                    <p class="text-gray-600 mb-4">详细介绍了如何配置施耐德ATV12系列变频器的Modbus通信参数，了解寄存器映射等内容。</p>
                    <div class="space-y-3">
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>讲解Modbus协议的核心组成、工作原理及实现方式</span>
                        </div>
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>介绍变频器的通信接口和参数设置方法</span>
                        </div>
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>提供具体的Modbus配置步骤和编程技巧</span>
                        </div>
                    </div>
                    <a href="#" class="mt-6 inline-block px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">
                        查看完整示例
                    </a>
                </div>

                <div class="bg-gray-50 rounded-xl p-6 shadow-sm card-hover">
                    <div class="w-12 h-12 bg-secondary/10 rounded-lg flex items-center justify-center mb-4">
                        <i class="fa fa-file-text-o text-secondary text-xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">ModbusTCP通讯协议学习及实践(台达&三菱PLC通讯)</h3>
                    <p class="text-gray-600 mb-4">介绍ModbusTCP协议在工业控制中与PLC的通讯应用，包括寄存器读取和写入等操作。</p>
                    <div class="space-y-3">
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>以台达AS228T PLC为例，说明通过ModbusTCP修改PLC寄存器值的操作</span>
                        </div>
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>对比三菱PLC的SLMP协议与Modbus协议的特点</span>
                        </div>
                        <div class="flex items-start">
                            <i class="fa fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span>提供实际应用中的调试和故障排除方法</span>
                        </div>
                    </div>
                    <a href="#" class="mt-6 inline-block px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">
                        查看完整示例
                    </a>
                </div>
            </div>

            <div class="bg-gray-50 rounded-xl p-8">
                <h3 class="text-2xl font-bold mb-6">晨控CK-GW08网关与基恩士KV-X310系列PLC配置EtherCAT通讯连接手册</h3>
                <p class="text-gray-600 mb-6">针对晨控CK-GW08网关与基恩士KV-X310系列PLC的EtherCAT通讯配置，介绍使用KV STUDIO编程软件进行配置的步骤。</p>
                
                <div class="space-y-6">
                    <div class="bg-white p-6 rounded-lg shadow-sm">
                        <h4 class="text-lg font-semibold mb-3 flex items-center">
                            <i class="fa fa-check-circle text-green-500 mr-2"></i> EtherCAT设定
                        </h4>
                        <p class="text-gray-600">在KV STUDIO软件中进行EtherCAT相关设定，包括主站和从站的配置。</p>
                        <img src="https://picsum.photos/seed/ethercat1/800/400" alt="EtherCAT设定界面" class="w-full h-auto rounded-lg mt-3">
                    </div>
                    
                    <div class="bg-white p-6 rounded-lg shadow-sm">
                        <h4 class="text-lg font-semibold mb-3 flex items-center">
                            <i class="fa fa-check-circle text-green-500 mr-2"></i> 添加ECAT设备
                        </h4>
                        <p class="text-gray-600">添加CK-GW08网关作为EtherCAT从站设备，并进行相应的参数设置。</p>
                        <img src="https://picsum.photos/seed/ethercat2/800/400" alt="添加ECAT设备界面" class="w-full h-auto rounded-lg mt-3">
                    </div>
                    
                    <div class="bg-white p-6 rounded-lg shadow-sm">
                        <h4 class="text-lg font-semibold mb-3 flex items-center">
                            <i class="fa fa-check-circle text-green-500 mr-2"></i> 映射分配与数据读取
                        </h4>
                        <p class="text-gray-600">设置映射内存，新建变量，并进行地址设定，实现数据的读取和写入操作。</p>
                        <img src="https://picsum.photos/seed/ethercat3/800/400" alt="映射分配界面" class="w-full h-auto rounded-lg mt-3">
                    </div>
                </div>
                
                <a href="#" class="mt-6 inline-block px-6 py-3 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">
                    下载完整操作手册
                </a>
            </div>
        </div>
    </section>

    <!-- 常见问题 -->
    <section id="faq" class="py-16 bg-gray-50">
        <div class="container mx-auto px-4 sm:px-6 lg:px-8">
            <div class="text-center mb-16">
                <h2 class="text-3xl md:text-4xl font-bold mb-4">常见问题</h2>
                <p class="text-gray-600 max-w-3xl mx-auto">这里收集了关于通讯协议的常见问题及解答，帮助你快速解决遇到的问题。</p>
            </div>

            <div class="max-w-3xl mx-auto">
                <div class="space-y-6">
                    <div class="bg-white rounded-lg shadow-sm overflow-hidden">
                        <button class="faq-toggle w-full px-6 py-4 text-left font-semibold flex justify-between items-center">
                            <span>如何选择适合的通讯协议？</span>
                            <i class="fa fa-chevron-down text-primary transition-transform duration-300"></i>
                        </button>
                        <div class="faq-content px-6 pb-4 hidden">
                            <p class="text-gray-600">选择通讯协议时，需要考虑以下因素：</p>
                            <ul class="mt-3 space-y-2 text-gray-600">
                                <li class="flex items-start">
                                    <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                    <span>应用场景：是网络通信、设备互联还是工业控制</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                    <span>设备资源限制：内存、处理能力等</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                    <span>网络环境：带宽、稳定性、延迟要求</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                    <span>数据传输需求：实时性、可靠性、安全性要求</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                    <span>兼容性：与现有系统和设备的兼容性</span>
                                </li>
                            </ul>
                        </div>
                    </div>

                    <div class="bg-white rounded-lg shadow-sm overflow-hidden">
                        <button class="faq-toggle w-full px-6 py-4 text-left font-semibold flex justify-between items-center">
                            <span>如何解决通讯协议中的兼容性问题？</span>
                            <i class="fa fa-chevron-down text-primary transition-transform duration-300"></i>
                        </button>
                        <div class="faq-content px-6 pb-4 hidden">
                            <p class="text-gray-600">解决通讯协议兼容性问题的方法包括：</p>
                            <ul class="mt-3 space-y-2 text-gray-600">
                                <li class="flex items-start">
                                    <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                    <span>使用协议转换器：将一种协议转换为另一种协议</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                    <span>开发中间件：实现不同协议之间的数据转换和映射</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                    <span>采用标准化协议：选择广泛支持的标准协议</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fa fa-circle text-xs text-primary mt-1.5 mr-2"></i>
                                    